import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

const store = new Vuex.Store({

	state: {
		address: "",
		currentPagePath: "",
		currentPageOption: "",
		userInfo: uni.getStorageSync('userInfo'),
		location: uni.getStorageSync('location'),
		classCurrent: 0, //商品分类首页
		tabbar: [{
				iconPath: "/static/index.png",
				selectedIconPath: "/static/index_s.png",
				text: '首页',
				pagePath: "/pages/index/index"
			},
			{
				iconPath: "/static/coupond.png",
				selectedIconPath: "/static/coupond_s.png",
				text: '洗车券',
				pagePath: "/pages/myCoupon/index"
			},
			// {
			// 	iconPath: "/static/scan.png",
			// 	selectedIconPath: "/static/scan.png",
			// 	text: '扫码',
			// 	midButton: true,
			// 	pagePath: "/pages/scan/index"
			// },
			{
				iconPath: "/static/car.png",
				selectedIconPath: "/static/car_s.png",
				text: '爱车',
				pagePath: "/pages/active/index"
			},
			{
				iconPath: "/static/my.png",
				selectedIconPath: "/static/my_s.png",
				text: '我的',
				pagePath: "/pages/my/index"
			},
		]
	},
	mutations: {
		adduser(state) {
			state.userInfo = uni.getStorageSync("userInfo")
		},
		addlocation(state) {
			state.location = uni.getStorageSync("location")
		},
		
		
		

	},
	actions: {

	},
	getters: {

	}
});

export default store;
